import request from "@/utils/request";

/**
 * 车辆信息
 * @param {*} data
 * @returns
 */
export async function getCarInfo(data) {
  return request.post("/car/getCarList", data);
}

/**
 * 告警统计
 * @param {*} data
 * @returns
 */
export async function getCarAlarm(data) {
  return request.post("/kshdp/getAdsAlarmStatLastMonth", data);
}

/**
 * 车速里程
 * @param {*} data
 * @returns
 */
export async function getCarVelocity(data) {
  return request.post("/kshdp/getAdsCarMileageVelocity", data);
}

/**
 * 能耗统计
 * @param {*} data
 * @returns
 */
export async function getCarConsume(data) {
  return request.post("/kshdp/getAdsConsumeStatLastMonth", data);
}

/**
 * 里程和急加速统计
 * @param {*} data
 * @returns
 */
export async function getCarMileage(data) {
  return request.post("/kshdp/getAdsMileageStatLastMonth", data);
}

/**
 * 温度统计
 * @param {*} data
 * @returns
 */
export async function getCarTemperature(data) {
  return request.post("/kshdp/getAdsTemperatureStatLastMonth", data);
}

/**
 * 里程消耗
 * @param {*} data
 * @returns
 */
export async function getCarMileageConsume(vin) {
  return request.get("/kshdp/getAdsConsumeStatDay", { params: { vin } });
}
